package com.huike.controller.statistics;

import com.huike.service.Statistics.MarketStatisticsService;
import com.huike.vo.ClientStatisticsVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/report")
@Slf4j
@Api(tags = "销售统计相关接口")
public class MarketStatisticsController {
    @Autowired
    private MarketStatisticsService marketStatisticsService;
    @ApiOperation("销售统计折线图")
    @GetMapping("/salesStatistics/{beginCreateTime}/{endCreateTime}")
    public ClientStatisticsVO salesStatistics(@PathVariable String beginCreateTime, @PathVariable String endCreateTime){
        log.info("销售统计折线图==={},{}",beginCreateTime,endCreateTime);
        return marketStatisticsService.salesStatistics(beginCreateTime,endCreateTime);
    }
}
